package com.jack.thinking.java._22.swing.swt;

import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class HelloSWT {
	public static void main(String[] args) {
		Display display = new Display();
		Shell shell = new Shell(display);
		shell.setText("Hi there, SWT!");
		shell.open();
		
		while(!shell.isDisposed()) {     //检测 shell 是否已被释放
			if(!display.readAndDispatch()) {
				display.sleep();
			} 
		}
		display.dispose();
	}
}
